-- GENERATED SPELL FOR [Bloodmaul Warlock] --


function spell0_19994(pUnit, Event) --@Bloodmaul Buzz,Self--
pUnit:FullCastSpellOnTarget(34932,pUnit)
pUnit:RegisterEvent('Sorts_19994', 20302, 1)
end

function spell1_19994(pUnit, Event) --@Demon Armor,Self--
pUnit:FullCastSpellOnTarget(13787,pUnit)
pUnit:RegisterEvent('Sorts_19994', 0, 1)
end

function spell2_19994(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20825,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19994', 3000, 1)
end

function spell3_19994(pUnit, Event) --@Summon Imp,Self--
pUnit:FullCastSpellOnTarget(11939,pUnit)
pUnit:RegisterEvent('Sorts_19994', 686, 1)
end

function Sorts_19994(pUnit, Event)
local choix_sorts_19994 = math.random(0, 3)
if choix_sorts_19994 == 0 then
pUnit:RegisterEvent('spell0_19994', 1, 1)
end
if choix_sorts_19994 == 1 then
pUnit:RegisterEvent('spell1_19994', 1, 1)
end
if choix_sorts_19994 == 2 then
pUnit:RegisterEvent('spell2_19994', 1, 1)
end
if choix_sorts_19994 == 3 then
pUnit:RegisterEvent('spell3_19994', 1, 1)
end
end

function mob19994_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19994', math.random(1500, 3000), 1)
end

function mob19994_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19994_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19994_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19994, 1, 'mob19994_Action')
RegisterUnitEvent(19994, 2, 'mob19994_Leave')
RegisterUnitEvent(19994, 3, 'mob19994_Kill')
RegisterUnitEvent(19994, 4, 'mob19994_Die')
